<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page import="entity.Post"%>

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Update a Post Record</title>
    </head>
    <body>
        <h1>Update a Post record</h1>
        <form id="updatePostForm" action="UpdatePost" method="post">
            <input type="hidden" id = "updateId" name="id" value="${post.getId()}"/>
            <table>
                <tr><td>Message : </td><td><input type="text" id = "tweet" name="tweet" value="${post.getTweet()}"/></td></tr>
                <tr><td>Public : </td><td><input type="checkbox" id = "visible" name="visible" value="${post.getVisible()}"/></td></tr>
            </table>
            <input type="submit" id="UpdateRecord" value="UpdateRecord" />
        </form>

        <form id="deletePostForm" action="DeletePost" method="post">
            <input type="hidden" id = "deleteId" name="id" value="${post.getId()}"/>
            <input type="submit" id="DeleteRecord" value="DeleteRecord" />
        </form>
        <a href="ListPost"><strong>Go to List of posts</strong></a>
    </body>
</html>